Skip to content

Conversation

@bsmartradio
Copy link
Contributor

No description provided.

@ebellm ebellm force-pushed the tickets/DM-50987 branch from 7efc0df to a36cd5f Compare July 13, 2025 00:59
Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning this review first since I'm asking for a lot of changes. I don't think it makes sense to split the service configuration across two variables, or to have it in both variables and config. I'd also like to take another look at the networking code once it's been cleaned up.

Also, please clean up the commit history, merging all the "fixup" commits and editing the commit message. Lines like "Fix" and "More Fix" aren't really helpful to someone looking at the repo history.

(I also agree with everything K-T said.)

Comment on lines 1014 to 1016
sattle_output = requests.put(
f'{self.config.sattle_host}:{self.config.sattle_port}/diasource_allow_list',
json={"visit_id": visit_id, "detector_id": detector_id, "diasources": dia_sources_json})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the scope of this review, but PUT doesn't seem like the right method for a query. Should this be GET/POST instead?

@ebellm
Copy link
Contributor

ebellm commented Jul 17, 2025

@kfindeisen Here's a potential restructuring of the code--if you're happy with the general direction I'll rework the tests. Ditto in pipe_tasks. Not linted, obviously.

Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better, main objection is that prepareSattleDiaSourcePayload does half the work of querying in a way that forces its caller to still have to deal with all the network stuff. Other comments are details.

@ebellm ebellm force-pushed the tickets/DM-50987 branch 2 times, most recently from 407a7e8 to 55db76b Compare July 20, 2025 15:15
Copy link
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but please do not use "respond to review" commits. They're specifically disallowed by policy, and they do nothing but make it harder for anyone to tell what's actually changed.

Comment on lines +757 to +758
with self.assertRaises(requests.exceptions.HTTPError):
detectionTask.run(science, matchedTemplate, difference, sources,
idFactory=IdFactory.makeSimple())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this conform to the rules for how tasks report errors (which I'll admit I'm not up to date on)?

Add the sattle filter call to detectAndMeasure, sending the bboxes and source id's to the sattle api. It then returns a list of acceptable sources, which is used to remake the diaSource catalog containing only the required sources.
@ebellm ebellm force-pushed the tickets/DM-50987 branch from 55db76b to c01f5bd Compare July 23, 2025 05:02
@ebellm ebellm merged commit 902279c into main Jul 23, 2025
4 of 5 checks passed
@ebellm ebellm deleted the tickets/DM-50987 branch July 23, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants